<?php
namespace Mapi\Model;
use Think\Model;

class UserLoginInfoModel extends Model {
	protected $_auto = array(
		array('logintime', 'time', 3, 'function'),
		array('loginip', 'getip', 3, 'callback'),
	);
	protected $_map=array(
		'clientType'=>'clienttype',
		'deviceName'=>'devicename',
		'appVersion'=>'appversion',
		'channelId'=>'channelid',
		'deviceId'=>'deviceid'
	);

	protected function getip(){
		return I('server.HTTP_X_REAL_IP');
	}
}